USE [DTP]
GO

/****** Object:  StoredProcedure [dbo].[CreateVehicleCard]    Script Date: 11/26/2010 16:40:28 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO




CREATE PROCEDURE [dbo].[CreatePersonCard]	
@id bigint
AS
BEGIN
	SET NOCOUNT ON;
	DECLARE @tmp bigint;
	INSERT INTO t_PersonCards (
					Deleted
					) 
	VALUES (0);
	SELECT @tmp = SCOPE_IDENTITY();
	
	INSERT INTO t_AccidentToPerson ( AccidentID, PersonID, Deleted )
	Values ( @id, @tmp, 0 );
	
	Select @tmp;
END


GO


